﻿using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using DataSetEscorpiusTourTableAdapters;

/// <summary>
/// Descripción breve de DetalleCaracteristicasBLL
/// </summary>
public class DetalleCaracteristicasBLL
{
	public DetalleCaracteristicasBLL(){}

    //conexion con base de datos EscorpiusTour
    private DETALLE_CARACTERISTICAS_MOVILTableAdapter _DetalleAdapter = null;
    protected DETALLE_CARACTERISTICAS_MOVILTableAdapter Adapter
    {
        get
        {
            if (_DetalleAdapter == null)
                _DetalleAdapter = new DETALLE_CARACTERISTICAS_MOVILTableAdapter();

            return _DetalleAdapter;
        }
    }

    //insertar Detalle Caracteristica Movil
    [System.ComponentModel.DataObjectMethodAttribute
    (System.ComponentModel.DataObjectMethodType.Insert, true)]
    public int insertarCaracteristicaMovil(string patente, int id_car)
    {
        int filas_afectadas = Adapter.Insert(patente, id_car);
        if (filas_afectadas == 0) return 0;
        else return 1;
    }

    //eliminar Detalle Caracteristica Movil
    [System.ComponentModel.DataObjectMethodAttribute
    (System.ComponentModel.DataObjectMethodType.Delete, true)]
    public int eliminarCaracteristicaMovil(string patente, int id_car)
    {
        int filas_afectadas = Adapter.Delete(id_car, patente);
        if (filas_afectadas == 0) return 0;
        else return 1;
    }

}
